<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
    <title>$Title$</title>
    <style>
        .container {
            max-width: 800px;
            margin: 20px auto;
            padding: 20px;
        }

        h1 {
            color: #333;
        }

        .checkbox-group {
            margin: 15px 0;
        }

        .checkbox-group label {
            display: block;
            margin: 8px 0;
        }

        button {
            padding: 10px 20px;
            background: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
        }

        button:hover {
            background: #45a049;
        }
    </style>
</head>
<body>
<div class="container">
    <h1>Select PITest Mutators</h1>
    <form action="MutationServlet" method="post" onsubmit="return validateForm()">
        <div class="checkbox-group">
            <label><input type="checkbox" name="mutators" value="CONDITIONALS_BOUNDARY"> Conditionals Boundary</label>
            <label><input type="checkbox" name="mutators" value="INCREMENTS"> Increments Mutator</label>
            <label><input type="checkbox" name="mutators" value="INVERT_NEGS"> Invert Negatives</label>
            <label><input type="checkbox" name="mutators" value="MATH"> Math Mutator</label>
            <label><input type="checkbox" name="mutators" value="VOID_METHOD_CALLS"> Void Method Calls</label>
            <!-- 添加更多PITest算子选项 -->
        </div>
        <button type="submit">Generate Report</button>
    </form>
</div>
<script>
    function validateForm() {
        const checkboxes = document.querySelectorAll('input[name="mutators"]:checked');
        if (checkboxes.length === 0) {
            alert('Please select at least one mutator!');
            return false;
        }
        return true;
    }
</script>
</body>
</html>
